<?php

namespace App\RBAC;

use Illuminate\Database\Eloquent\Model;

class Resource extends Model
{
    protected $fillable = [
        'name', 'description','res_string','res_type_id',
    ];

    public function resType()
    {
        return $this->hasOne('App\RBAC\ResType');
    }

    public function operations()
    {
        return $this->belongsToMany('App\RBAC\Operation','privileges');
    }
}
